import request from '@/utils/request'

// 创建投入品与农事中间
export function createInputHusbandry(data) {
  return request({
    url: '/produce/input-husbandry/create',
    method: 'post',
    data: data
  })
}

// 更新投入品与农事中间
export function updateInputHusbandry(data) {
  return request({
    url: '/produce/input-husbandry/update',
    method: 'put',
    data: data
  })
}

// 删除投入品与农事中间
export function deleteInputHusbandry(id) {
  return request({
    url: '/produce/input-husbandry/delete?id=' + id,
    method: 'delete'
  })
}

// 获得投入品与农事中间
export function getInputHusbandry(id) {
  return request({
    url: '/produce/input-husbandry/get?id=' + id,
    method: 'get'
  })
}

// 获得投入品与农事中间分页
export function getInputHusbandryPage(query) {
  return request({
    url: '/produce/input-husbandry/page',
    method: 'get',
    params: query
  })
}

// 导出投入品与农事中间 Excel
export function exportInputHusbandryExcel(query) {
  return request({
    url: '/produce/input-husbandry/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
